﻿#ifndef WIDGET_H
#define WIDGET_H

#include "common/baseeditor.h"
#include "additem.h"

namespace Ui {
class Widget;
}

class Widget : public BaseEditor
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

    void updateView();
    void setHeaderData();
    void generateMenu();
    void updateSearchBox();
    void do_putLocation();
    void newItem();
    void removeItem();
    void edit_off();
    void edit_on();
    void putLocation(const QString &patLocation);

private slots:
    void on_keyword_returnPressed();
    void on_tableView_doubleClicked(const QModelIndex &index);

private:
    Ui::Widget *ui;

    QString patLocation;
    QString searchPrefix;
    QMap<QString,QString> items;
};

#endif // WIDGET_H
